package com.xzh.wms.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.xzh.wms.entity.*;
import com.xzh.wms.service.ShelfService;
import java.util.List;

 /**
 * 货架;(206_shelf)控制层
 * @author : heimi
 * @date : 2024-11-22
 */
@RestController
@RequestMapping("/api/shelf")
public class ShelfController{
    @Autowired
    private ShelfService shelfService;
    
    /** 
     * 查询接口
     */
     @GetMapping
     public List<Shelf> select(ShelfQuery query){
        return shelfService.select(query);
    }
    
    @PostMapping 
    public Integer insert(@RequestBody Shelf product){
       return shelfService.insert(product);
    }
    
    @PutMapping 
    public Integer update(@RequestBody Shelf product){
        return shelfService.update(product);
    }
    
    @DeleteMapping
    public Integer delete(Integer id){
        return shelfService.delete(id);
    }
}